#include <stdio.h>

double calc_add(int x, int y, double *ret)
{
    *ret = x + y;
    return *ret;
}

double calc_substract(int x, int y, double *ret)
{
    *ret = x - y;
    return *ret;
}

double calc_mul(int x, int y, double *ret)
{
    *ret = x * y;
    return *ret;
}

double calc_div(int x, int y, double *ret)
{
    *ret = (double)x / y;
    return *ret;
}

double calculate(int x, int y, double *ret, double (*calc)(int x, int y, double *ret))
{
    return calc(x, y, ret);
}

int main(int argc, char const *argv[])
{
    double ret;
    double ret1 = calculate(9, 81, &ret, calc_div);
    /* code */
    printf("%lf %lf\n", ret, ret1);
    return 0;
}
